package com.qiu.repository;

import com.qiu.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * @author shkstart
 * @date 2020/11/26 - 16:02
 */

public interface UserRepository extends JpaRepository<User, Long> {
    User findByName(String name);

    @Query("from User u where u.name=:name")
    User findUser(@Param("name") String name);


}
